﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace PlatformNetCore.Entity
{
    [Table("Category")]
    public class Category
    {
        /// <summary>
        /// 分类编码
        /// </summary>
        [Key]
        [MaxLength(50)]
        public string ID { get; set; }
        /// <summary>
        /// 分类名称
        /// </summary>
        [MaxLength(50)]
        [Required(AllowEmptyStrings = false, ErrorMessage = "分类名称不能为空")]
        public string CategoryName { get; set; }
        /// <summary>
        /// 图标
        /// </summary>
        [MaxLength(200)]
        public string IconImage { get; set; }
        /// <summary>
        /// 类型
        /// </summary>
        [MaxLength(50)]
        public string CategoryType { get; set; }
        /// <summary>
        /// 排序号
        /// </summary>
        public int SortNo { get; set; }
        /// <summary>
        /// 是否启用
        /// </summary>
        public int IsAvailable { get; set; }
        /// <summary>
        /// 是否删除
        /// </summary>
        public int IsDel { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        [MaxLength(200)]
        public string Description { get; set; }
        
        [MaxLength(50)]
        public string AddBy { get; set; }
        public Nullable<DateTime> AddDate { get; set; }
        [MaxLength(50)]
        public string UpdateBy { get; set; }
        public Nullable<DateTime> UpdateDate { get; set; }
    }
}
